#include "Void.h"

#include <string.h>
#include <fan-llvm/core/Core.h>
#include "Type.h"
#include "UnsupportedErr.h"


Type* Void_classType = NULL;
VTable* Void_classVTable = NULL;


/**********************************************
 *
 * Methods and fields
 *
 **********************************************/


/**********************************************
 *
 * Type-system functions
 *
 **********************************************/


Type* Void_initType(void)
{
  if (Void_classType == NULL)
  {
    Type* baseType = Obj_initType();
    VTable* vtable = Void_initVTable();
    Type* type = Type_new("Void", baseType, vtable, sizeof(Void), sizeof(VoidVTable));
    Void_classType = type;
    Void_initStatic();
  }
  return Void_classType;
}


VTable* Void_initVTable(void)
{
  if (Void_classVTable == NULL)
  {
    VTable* vtable = memoryAlloc(sizeof(VoidVTable));
    memcpy(vtable, Obj_initVTable(), sizeof(FanObjVTable));
    Void_classVTable = vtable;
  }
  return Void_classVTable;
}


void Void_initStatic(void)
{
}
